home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / mprotect.man < prev    next >
Encoding:
Text File  |  1990-07-27  |  2.0 KB  |  67 lines

  1.  
  2.  
  3.  
  4. MPROTECT              C Library Procedures               MPROTECT
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      mprotect - set protection of memory mapping
  10.  
  11. SSYYNNOOPPSSIISS
  12.      ##iinncclluuddee <<ssyyss//mmmmaann..hh>>
  13.      mmpprrootteecctt((aaddddrr,, lleenn,, pprroott))
  14.      ccaaddddrr__tt aaddddrr;; iinntt lleenn,, pprroott;;
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      mmpprrootteecctt(()) changes the access protections on the mappings
  18.      specified by the range [_a_d_d_r, _a_d_d_r + _l_e_n) to be that speci-
  19.      fied by _p_r_o_t.  Legitimate values for _p_r_o_t are the same as
  20.      those permitted for mmmmaapp(2).
  21.  
  22. RREETTUURRNN VVAALLUUEE
  23.      mmpprrootteecctt(()) returns 0 on success, -1 on failure.
  24.  
  25. EERRRROORRSS
  26.      mmpprrootteecctt(()) will fail if:
  27.  
  28.      EACCES              _p_r_o_t specifies a protection which
  29.                          violates the access permission the pro-
  30.                          cess has to the underlying memory
  31.                          object.
  32.  
  33.      EINVAL              _a_d_d_r is not a multiple of the page size
  34.                          as returned by ggeettppaaggeessiizzee(2).
  35.  
  36.      ENOMEM              Addresses in the range [_a_d_d_r, _a_d_d_r +
  37.                          _l_e_n) are invalid for the address space
  38.                          of a process, or specify one or more
  39.                          pages which are not mapped.
  40.  
  41.      When mmpprrootteecctt(()) fails for reasons other than EINVAL, the
  42.      protections on some of the pages in the range [_a_d_d_r, _a_d_d_r +
  43.      _l_e_n) will have been changed.  If the error occurs on some
  44.      page at address _a_d_d_r_2, then the protections of all whole
  45.      pages in the range [_a_d_d_r, _a_d_d_r_2) have been modified.
  46.  
  47. SSEEEE AALLSSOO
  48.      ggeettppaaggeessiizzee(2), mmmmaapp(2)
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0             25 September 1987                       1
  64.  
  65.  
  66.  
  67.